//package com.zp.framework.services.test;
//
//import javax.ws.rs.core.MediaType;
//
//import junit.framework.Assert;
//
//import org.apache.commons.logging.Log;
//import org.apache.commons.logging.LogFactory;
//import org.junit.After;
//import org.junit.Before;
//import org.junit.Test;
//import org.junit.runner.RunWith;
//import org.springframework.test.context.ContextConfiguration;
//import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
//
//import com.sun.jersey.api.client.Client;
//import com.sun.jersey.api.client.ClientResponse;
//import com.sun.jersey.api.client.WebResource;
//import com.sun.jersey.api.client.config.ClientConfig;
//import com.sun.jersey.api.client.config.DefaultClientConfig;
//import com.zp.domain.demo.ResultDataVo;
//
//
///**
// * test Type services function with Junit
// * 
// * @author chenlijun08@gmail.com
// * 
// * @version 1.0
// * 
// * @date 2014/2/9
// * 
// */
//
//@RunWith(SpringJUnit4ClassRunner.class)
//@ContextConfiguration(locations = { "classpath:configure/applicationContext.xml" })
//public class RunDemoServices {
//
//	private static final Log logger = LogFactory
//			.getLog(RunDemoServices.class);
//	private static final String URI = "http://localhost:8082/ZP";
//	private WebResource service;
//
//	@Before
//	public void init() {
//		ClientConfig config = new DefaultClientConfig();
//		Client client = Client.create(config);
//		service = client.resource(URI);
//		logger.info("*********** testing to initial services client ****************");
//	}
//
//	@After
//	public void destory() {
//		service = null;
//		logger.info("*********** testing to destory services instance ******************");
//	}
//@Test
//	public void testDemo(){
//		ClientResponse response = service.path("/demo/hello")
//				.type(MediaType.APPLICATION_JSON_TYPE)
//				.get(ClientResponse.class);
//		ResultDataVo result=response.getEntity(ResultDataVo.class);
//	Assert.assertEquals("Alex",result.getUser().getUser().getName());
//		
//	}
//}
